package com.mallplus.rbac.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author Hanson
 * @date 2023/4/15 18:56
 */
@Data
public class RouteVO {

    @Schema(description = "id")
    private Long id;

    @Schema(description = "parentId")
    private Long parentId;

    @Schema(description = "路径：就像url")
    private String path;

    @Schema(description = "组件如：1.'Layout' 为布局，不会跳页面 2.'components-demo/tinymce' 跳转到该页面")
    private String component;

    @Schema(description = "当设置 noRedirect 的时候该路由在面包屑导航中不可被点击")
    private String redirect;

    @Schema(description = "当设置 true 的时候该路由不会在侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1")
    private Boolean hidden;

    @Schema(description = "一直显示根路由\"")
    private Boolean alwaysShow;

    @Schema(description = "设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题")
    private String name;

    @Schema(description = "排序")
    private Integer seq;

    @Schema(description = "路由的源信息")
    private RouteMetaVO meta;

    @Override
    public String toString() {
        return "RouteVo{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", path=" + path + '\'' +
                ", component=" + component + '\'' +
                ", redirect=" + redirect + '\'' +
                ", alwaysShow=" + alwaysShow +
                ", hidden=" + hidden +
                ", name=" + name + '\'' +
                ", seq=" + seq +
                ", meta=" + meta +
                "}";
    }
}
